﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ComeSeeThis_MVC2.Models.Vehicle>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Vehicle
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Vehicle</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Company
            </th>
            <th>
                Vehicle Type
            </th>
            <th>
                Vehicle Name
            </th>
            <th>
                Part Number
            </th>
            <th>
                Description
            </th>
            <th>
                Weight
            </th>
            <th>
                Transmission Ratio
            </th>
            <th>
                SubmittedBy
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Approve", "VehicleApprove", "ProductsAdmin", new { id=item.VehicleId },  null) %> |
                <%: Html.ActionLink("Edit", "VehicleEdit", "ProductsAdmin", new { id=item.VehicleId},  null) %> |
                <%: Html.ActionLink("Details", "VehicleDetails", "Vehicle", new { id = item.VehicleId }, null)%> |
                <%: Html.ActionLink("Delete", "VehicleDelete", "Vehicle", new { id = item.VehicleId }, null)%>
            </td>
            <td>
                <%: item.Company.CompanyName %>
            </td>
            <td>
                <%: item.VehicleType.VehicleTypeName %>
            </td>
            <td>
                <%: item.VehicleName %>
            </td>
            <td>
                <%: item.PartNumber %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: item.Weight %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.TransmissionRatio) %>
            </td>
            <td>
                <%: item.SubmittedBy %>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="BodyTagContent" runat="server">
</asp:Content>

